/*
* Copyright 2011 Pavel Kozhin 
*
* Licensed under the Apache License, Version 2.0 (the "License"); 
* you may not use this file except in compliance with the License. 
* You may obtain a copy of the License at 
* 
* http://www.apache.org/licenses/LICENSE-2.0
* 
* Unless required by applicable law or agreed to in writing, software 
* distributed  under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
* See the License for the specific language governing permissions and 
* limitations under the License.
*
* Author: Pavel Kozhin.
*/
package org.etherframework.core.bridge
{
	import flash.display.DisplayObject;
	import flash.events.IEventDispatcher;
	import flash.system.ApplicationDomain;
	
	import org.etherframework.IEther;
	import org.etherframework.core.EtherConfig;
	import org.etherframework.core.common.IArgumentFactory;
	import org.etherframework.core.common.IControllerFactory;
	import org.etherframework.core.context.Context;
	import org.etherframework.core.context.IContexts;
	import org.etherframework.core.manager.DestructionManager;
	import org.etherframework.core.utils.Dispatcher;

	public interface IBridge
	{
		function createEther(context:Context = null):IEther;
		
		function hasController(target:Object):IObjectController;
		
		function process(target:Object, ether:IEther = null, 
						  controllerFactory:IControllerFactory = null,
						  argumentFactory:IArgumentFactory = null):Object;
		
		function destruct(value:Object):void;
		
		function get destructionManager():DestructionManager;
		
		function get controllers():Controllers;
		
		function get facade():IBridgeFacades;
		
		function get interaction():IInteraction;
		
		function get dispatcher():Dispatcher;
		
		function get applicationDomain():ApplicationDomain;
			
		function get access():String;
		
		function set access(value:String):void;
		
		function get domain():String;
		
		function get config():EtherConfig;
		
		function set domain(value:String):void;
		
		function get view():DisplayObject;
		
		function get contexts():IContexts;
	}
}